package com.service.impl;

import com.entity.FUser;
import com.entity.table.BUserTableDef;
import com.entity.table.FUserTableDef;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.entity.BUser;
import com.mapper.BUserMapper;
import com.service.BUserService;
import org.springframework.stereotype.Service;

/**
 * 管理员表 服务层实现。
 *
 * @author admin
 * @since 2024-05-22
 */
@Service
public class BUserServiceImpl extends ServiceImpl<BUserMapper, BUser> implements BUserService {

    public BUser selectBUser(BUser bUser) {
        QueryWrapper query = QueryWrapper.create()
                .where(BUserTableDef.B_USER.USERNAME.eq(bUser.getUsername()))
                .and(BUserTableDef.B_USER.PASSWORD.eq(bUser.getPassword()));
        BUser res = getOne(query);
        return res;
    }

}
